package demo.enums;

// 验证两个EnumTest实例，持有的同一个枚举类实例SHIKI是否是相同的。
public class EnumTest {
	private enum Person{
		SHIKI;
	}
	public static Person getInstance(){
		return Person.SHIKI;
	}

	public static void main(String[] args) {
		EnumTest t1 = new EnumTest();
		EnumTest t2 = new EnumTest();
		System.out.println(t1.getInstance() == t2.getInstance());//true
		System.out.println(t1.getInstance() == Person.SHIKI);//true
	}
}
